#include "Precompiled.h"
#include "SceneManager.h"
#include "EntityLogicManager.h"

namespace Game {
namespace Common {

RTTI_IMPL(SceneManager, DrawableEntity);

SceneManager::SceneManager() :
        entityLogicManager(NULL),
        scenes(new Collection<Scene*>()) {
}

SceneManager::~SceneManager() {
    SAFE_DELETE(this->scenes);
}

EntityLogicManager* SceneManager::GetEntityLogicManager() const {
    return this->entityLogicManager;
}

void SceneManager::SetEntityLogicManager(EntityLogicManager* val) {
    this->entityLogicManager = val;
}

int SceneManager::GetCount() {
    return this->scenes->GetCount();
}

void SceneManager::Add(Scene* item) {
    item->SetEntityLogicManager(entityLogicManager);
    this->scenes->Add(item);
}

void SceneManager::Clear() {
    this->scenes->Clear();
}

Scene* SceneManager::GetItem(int index) {
    return this->scenes->GetItem(index);
}

int SceneManager::IndexOf(Scene* item) {
    return this->scenes->IndexOf(item);
}

bool SceneManager::Remove(Scene* item) {
    return this->scenes->Remove(item);
}

void SceneManager::RemoveAt(int index) {
    this->scenes->RemoveAt(index);
}

}
}